/**
 * （社保、公积金）异动管理、查询api
 */

import axios from '@/libs/api.request'
export default class changeManageApi {
  // 获取异动列表
  static getChangeList = (params) => {
    return axios.request({
      url: '/Changes/GetList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取编号数据
  static GetSecurityNoList = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/GetSecurityNoList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 申报操作
  static changeDeclare = (params) => {
    return axios.request({
      url: '/Changes/BatchDeclare',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 审核操作
  static changeAudit = (params) => {
    return axios.request({
      url: '/Changes/BatchAudit',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 异动操作
  static changeCancel = (params) => {
    return axios.request({
      url: '/Changes/BatchCancel',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 导出
  static Export = (params) => {
    return axios.request({
      url: '/Changes/Export',
      method: 'post',
      data: params,
      responseType: 'blob'
    })
  }
  // 导出并锁定
  static ExportAndLock = (params) => {
    return axios.request({
      url: '/Changes/ExportAndLock',
      method: 'post',
      data: params,
      responseType: 'blob'
    })
  }

  // 下载
  static downLoad = (params) => {
    return axios.request({
      url: '/Employee/DownloadPictureFile',
      method: 'post',
      data: params
      // responseType: 'blob'
    })
  }

  // 获取导出模板
  static GetExportList = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/GetExportList',
      method: 'get',
      params: params
    })
  }

  // 获取自定义模板字段
  static GetCustomize = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/GetModel',
      method: 'post',
      data: params
    })
  }

  // 保存自定义模板
  static SaveCustomize = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/Save',
      method: 'post',
      data: params
    })
  }

  // 删除自定义模板
  static deleteCustomize = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/Delete',
      method: 'post',
      params: params
    })
  }

  // 新增|编辑模板
  static getSalaryModel = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/GetSalaryModel',
      method: 'post',
      data: params
    })
  }

  // 获取导出模板（new）
  static getCustomTemplate = (params) => {
    return axios.request({
      url: '/SysCustomTemplate/GetList',
      method: 'post',
      data: params
    })
  }
}
